<?php

namespace App\Models;

use App\Models\User\WxUser;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxChat extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'wx_chat';

    public function user1()
    {
        return $this->hasOne(WxUser::class, 'id', 'user_id');
    }

    public function user2()
    {
        return $this->hasOne(WxUser::class, 'id', 'object_id');
    }

}
